package com.Entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Topic entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "topic", catalog = "monitor")
public class Topic implements java.io.Serializable {

	// Fields

	private long topicId;
	private Integer clubCategoryId;
	private Integer doctorId;
	private Integer topicClassifyId;
	private Integer isClassical;
	private String topicTitle;
	private String topicContent;
	private byte[] topicImage;
	private String topicImageUrl;
	private Date topicCreatedTime;
	private Integer topicAuthorId;
	private Integer favoriteNumber;
	private Integer scanNumber;
	private Integer commentNumber;
	private String latestCommentUserName;
	private Date latestCommentTime;

	// Constructors

	/** default constructor */
	public Topic() {
	}

	/** full constructor */
	public Topic(Integer clubCategoryId,Integer doctorId, Integer topicClassifyId,
			Integer isClassical, String topicTitle, String topicContent,
			byte[] topicImage,String topicImageUrl, Date topicCreatedTime, Integer topicAuthorId,Integer favoriteNumber,
			Integer scanNumber, Integer commentNumber,String latestCommentUserName, Date latestCommentTime) {
		this.clubCategoryId = clubCategoryId;
		this.doctorId=doctorId;
		this.topicClassifyId = topicClassifyId;
		this.isClassical = isClassical;
		this.topicTitle = topicTitle;
		this.topicContent = topicContent;
		this.topicImage = topicImage;
		this.topicImageUrl=topicImageUrl;
		this.topicCreatedTime = topicCreatedTime;
		this.topicAuthorId = topicAuthorId;
		this.favoriteNumber=favoriteNumber;
		this.scanNumber = scanNumber;
		this.commentNumber = commentNumber;
		this.latestCommentUserName=latestCommentUserName;
		this.latestCommentTime = latestCommentTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "topicId", unique = true, nullable = false)
	public long getTopicId() {
		return this.topicId;
	}

	public void setTopicId(long topicId) {
		this.topicId = topicId;
	}

	@Column(name = "doctorId")
	public Integer getDoctorId() {
		return this.doctorId;
	}

	public void setDoctorId(Integer doctorId) {
		this.doctorId = doctorId;
	}
	
	@Column(name = "clubCategoryId")
	public Integer getClubCategoryId() {
		return this.clubCategoryId;
	}

	public void setClubCategoryId(Integer clubCategoryId) {
		this.clubCategoryId = clubCategoryId;
	}


	@Column(name = "topicClassifyId")
	public Integer getTopicClassifyId() {
		return this.topicClassifyId;
	}

	public void setTopicClassifyId(Integer topicClassifyId) {
		this.topicClassifyId = topicClassifyId;
	}

	@Column(name = "isClassical")
	public Integer getIsClassical() {
		return this.isClassical;
	}

	public void setIsClassical(Integer isClassical) {
		this.isClassical = isClassical;
	}

	@Column(name = "topicTitle", length = 200)
	public String getTopicTitle() {
		return this.topicTitle;
	}

	public void setTopicTitle(String topicTitle) {
		this.topicTitle = topicTitle;
	}
	
	@Column(name = "topicImage")
	public byte[] getTopicImage() {
		return this.topicImage;
	}

	public void setTopicImage(byte[] topicImage) {
		this.topicImage = topicImage;
	}

	@Column(name = "topicImageUrl", length = 200)
	public String getTopicImageUrl() {
		return this.topicImageUrl;
	}

	public void setTopicImageUrl(String topicImageUrl) {
		this.topicImageUrl = topicImageUrl;
	}
	
	@Column(name = "topicContent", length = 500)
	public String getTopicContent() {
		return this.topicContent;
	}

	public void setTopicContent(String topicContent) {
		this.topicContent = topicContent;
	}

	@Column(name = "topicCreatedTime", length = 19)
	public Date getTopicCreatedTime() {
		return this.topicCreatedTime;
	}

	public void setTopicCreatedTime(Date topicCreatedTime) {
		this.topicCreatedTime = topicCreatedTime;
	}

	@Column(name = "topicAuthorId")
	public Integer getTopicAuthorId() {
		return this.topicAuthorId;
	}

	public void setTopicAuthorId(Integer topicAuthorId) {
		this.topicAuthorId = topicAuthorId;
	}
	
	@Column(name = "favoriteNumber")
	public Integer getFavoriteNumber() {
		return this.favoriteNumber;
	}

	public void setFavoriteNumber(Integer favoriteNumber) {
		this.favoriteNumber = favoriteNumber;
	}

	@Column(name = "scanNumber")
	public Integer getScanNumber() {
		return this.scanNumber;
	}

	public void setScanNumber(Integer scanNumber) {
		this.scanNumber = scanNumber;
	}

	@Column(name = "commentNumber")
	public Integer getCommentNumber() {
		return this.commentNumber;
	}

	public void setCommentNumber(Integer commentNumber) {
		this.commentNumber = commentNumber;
	}
	
	@Column(name = "latestCommentUserName", length = 64)
	public String getLatestCommentUserName() {
		return latestCommentUserName;
	}

	public void setLatestCommentUserName(String latestCommentUserName) {
		this.latestCommentUserName = latestCommentUserName;
	}

	@Column(name = "latestCommentTime", length = 19)
	public Date getLatestCommentTime() {
		return this.latestCommentTime;
	}

	public void setLatestCommentTime(Date latestCommentTime) {
		this.latestCommentTime = latestCommentTime;
	}

}